<?php
// +----------------------------------------------------------------------
// | 知识星球[基于ThinkPHP5开发]
// +----------------------------------------------------------------------
// | Copyright (c) 2018-2019 abcblockchain.io
// +----------------------------------------------------------------------
// | 后台管理使用了HisiPHP
// +----------------------------------------------------------------------
// | Author: abcblockchain.io
// +----------------------------------------------------------------------
namespace app\common\validate;

use think\Validate;

/**
 * 主题验证器
 * @package app\admin\validate
 */
class Likes extends Validate
{
    //定义验证规则
    protected $rule = [
        'user_id|点赞人' => 'require',
        'likeable_id|点赞主题' => 'require',
    ];

    //定义验证提示
    protected $message = [
        'user_id.require' => '1',
        'likeable_id.require'  => '2',
    ];

    //定义验证场景
    protected $scene = [
        'create' => [
            'user_id',
            'likeable_id',
        ],
    ];
}
